<%@page import="java.util.Enumeration"%>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>C&M-Lab POI-Manager - Startseite</title>
<link rel="shortcut icon" type="image/x-icon" href="./images/favicon.ico">
<link rel="stylesheet" type="text/css" href="<%=application.getContextPath()%>/css/global_stylesheet.css">
</head>


<body>
<%-- Layout fragment  --%>
<%@include file="/header.jspf"%>
<%-- Layout fragment  --%>
<%@include file="/menu.jspf"%>

<h1>index.jsp</h1>

<%-- POI-Search Form: action="search" received by SearchServlet --%>
<form method="GET" action="search">
		
		<input type="submit" value="Search for POIs" />
		<label for="poiCategoryInput"> Enter POI category to filter: </label> 
		<input type="text" name="category" id="poiCategoryInput" />
</form>

<%-- Security-Info Print-out  --%>
<%	
	out.println("<p></br></p><hr>");
	out.println("Session-Information:");
	out.println("<hr>");
	//Used request parameters, just for additional info
	Enumeration<String> attributes = request.getAttributeNames();
	String str = new String();
	out.println("<p></br></p> request.getAttributeNames() in use: ");
	while (attributes.hasMoreElements())
	{  
		 str = (String)attributes.nextElement(); 
		 out.println("</br> " + str); 
	}
	
	//specific security Information
	out.println("<p></br></p> request.getScheme :  " 			+  request.getScheme());
	out.println("</br>HTTPS SessionID : " 						+ request.getAttribute("javax.servlet.request.ssl_session_id"));
	out.println("</br>Cipher Suite in use :  " 					+ request.getAttribute("javax.servlet.request.cipher_suite"));
	out.println("</br>Is encryption strong enough? check request.key_size :  " 		 + request.getAttribute("javax.servlet.request.key_size"));
	out.println("</br>Session-Identifier, used as JSESSIONID in Browser-COOKIE : " + request.getSession().getId());
	out.println("<hr>");
%>

<%-- Layout fragment  --%>
<%@include file="/footer.jspf"%>

</body>
</html>